public class J06yunsuanfu {
    public static void main(String[] args) {
        int a = 7;
//        int 3 = 7;
        int b;
        b = 8;
        System.out.println(b);
        System.out.println("===算术运算==");
        // 优先级问题
        // = 优先级最低
        int num1 = 2 + 3;
        System.out.println("num1 = " + num1);//5

        int num2 = num1 + 1;
        System.out.println("num2 = " + num2);

        int num3 = 5-2;
        System.out.println("num3 = " + num3);//3
        System.out.println(3-1);//2
        System.out.println("======");

    }
}

class J07chengchu{
    public static void main(String[] args) {
        System.out.println(3*4);//12
        System.out.println(1+2*2);//5

        System.out.println(6/2);//3
        System.out.println(100/70);//1....30   1
        System.out.println("=====");
        System.out.println(7/2);//3.5   3
        System.out.println(7.0/2);//3.5
    }
}

class J08yu{
    public static void main(String[] args) {
        // 求余，取模，求模
        System.out.println(10%7);//  3

        int a = 10, b = 8, c = 4;
        int d = a / c + b; //d的值是多少？
        int e = c * b / a; //e的值是多少？
        int f = b * c % a; //f的值是多少？

        System.out.println("d = " + d);//10
        System.out.println("e = " + e);//3
        System.out.println(f);//2

        //除数不许为0
//        System.out.println(10/0);
    }
}
